package me.yushuai.wukong.base.service;

import io.minio.errors.MinioException;
import me.yushuai.wukong.base.api.dto.PagingSearchAttachment;
import me.yushuai.wukong.base.entity.Attachment;
import me.yushuai.wukong.common.dto.PageDTO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

/**
 * 附件业务类
 *
 * @author zhoushuai@189.cn
 * @since 2023-09-19
 */
public interface AttachmentService {
    /**
     * 上传附件
     *
     * @param multipartFile 附件信息
     */
    void uploadFile(MultipartFile multipartFile) throws MinioException, IOException, NoSuchAlgorithmException, InvalidKeyException;

    PageDTO<Attachment> page(PagingSearchAttachment pagingSearch);
}
